
enum SIZE {
    //% block="29*29"
    1,
    //% block="58*58"
    2
}

enum LINE {
    //% block="1"
    1,
    //% block="2"
    2,
    //% block="3"
    3,
    //% block="4"
    4
}

enum BTN {
    //% block="A"
    A,
    //% block="B"
    B,
    //% block="A+B"
    AB
}


//% color="#0D8315" iconWidth=50 iconHeight=40
namespace SR04 {
    //% block="Read_Sr04  [Trig] Read_echo [Echo] " blockType="reporter"
    //% Trig.shadow="dropdown" Trig.options="Trig" 
//% Echo.shadow="dropdown" Echo.options="Trig"  
export function SR04(parameter: any,block: any) {
        let Trig = parameter.Trig.code;
        let Echo = parameter.Echo.code;
        Generator.addInclude("SR04_01", "#include <SR04.h>");
        Generator.addObject("SR04_01", "SR04", `Sr=SR04(${Trig},${Echo})`); 
              Generator.addCode([`Sr.Jl_CM()`, Generator.ORDER_UNARY_POSTFIX])；

    }
}
